package cn.javastudy.design._3_行为型模式._解释器模式;

import lombok.AllArgsConstructor;

/**
 * 终结符表达式角色
 *
 * @author sumou
 * @date 2025/01/25
 */
@AllArgsConstructor
public class Value extends AbstractExpression {

    private int value;

    @Override
    public int interpret(Context context) {
        return value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }

}
